﻿<%@ Page Title="Parts - Sales Order Pending Edit" Language="C#" MasterPageFile="~/Main.Master"
    AutoEventWireup="true" CodeBehind="SOPendingEdit.aspx.cs" Inherits="VSM.Parts.SOPendingEdit" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript">
        function OpenItemPopup() {
            var url = "../../../ItemPartPopup.aspx?itmgrp=102";
            Main.openCustomDialog(url, 600, 610, "Accessories - Item Master Data");
        }
        function OpenBP() {
            var url = "../../../BPPopup.aspx?CardType=C";
            Main.openCustomDialog(url, 600, 610, "Business Partner List");
        }
        function OpenDocList(docktype, title) {
            var url = "../../../DocumentList.aspx?DocType=" + docktype
            Main.openCustomDialog(url, 800, 610, title);
        }
        
    </script>
    <div>
        <asp:UpdatePanel ID="updatePanel" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:HiddenField ID="hdnIsUpdate" runat="server" />
                <asp:HiddenField ID="hdnStatus" runat="server" />
                <asp:HiddenField ID="hdnSlpCode" runat="server" />
                <asp:HiddenField ID="hdnBaseType" runat="server" />
                <asp:HiddenField ID="hdnNumAtCard" runat="server" />
                 <asp:HiddenField ID="hdnCount" runat="server" />
                <h2>
                    &nbsp;<asp:Label ID="lblTitle" runat="server" Text="Parts - Sales Order Pending Edit"></asp:Label>
                </h2>
                <div style="margin-left: 5px; width: 99%;">
                    <hr />
                    <table border="0" width="100%" style="background-color: #D1D4D8; font-weight: bold;">
                        <tr>
                            <td style="border-bottom: dotted 1px #808080; vertical-align: bottom;">
                                ID:
                            </td>
                            <td style="width: 200px;">
                                <asp:TextBox ID="txtSONo" runat="server" BackColor="#E6E6E6" ReadOnly="True" Width="100px"></asp:TextBox>
                            </td>
                            <td width="100px" style="width: 210px; border-bottom: dotted 1px #808080; vertical-align: bottom;">
                                Status:
                            </td>
                            <td align="left">
                                <asp:Label ID="lblStatus" runat="server" Text="Open" ForeColor="Red"></asp:Label>
                            </td>
                            <td align="right" style="display: none;">
                                <asp:Button ID="btnGetImportTemplate" runat="server" Height="26px" OnClick="btnGetImportTemplate_Click"
                                    Style="background-image: url('/Images/bgButton.png'); background-repeat: no-repeat;"
                                    Text="Get Import Template" Width="150px" />
                                <asp:Button ID="btnDocList" runat="server" OnClientClick="OpenDocList('17', 'Sales Order Pending Edit'); return false;"
                                    Style="background-image: url('/Images/bgButton.png'); background-repeat: no-repeat;"
                                    Text="List" Width="60px" Enabled="False" Visible="False" />
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 150px; border-bottom: dotted 1px #808080; vertical-align: bottom;">
                                Posting Date:
                            </td>
                            <td style="width: 200px">
                                <asp:TextBox ID="txtPostingDate" runat="server" AutoPostBack="True" Width="100px"
                                    OnTextChanged="txtPODate_TextChanged"></asp:TextBox>
                                <asp:ImageButton ID="Image1" runat="Server" AlternateText="Click to show calendar"
                                    ImageUrl="~/Images/Calendar_scheduleHS.png" />
                                <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtPostingDate"
                                    PopupButtonID="Image1" Format="dd/MM/yyyy">
                                </cc1:CalendarExtender>
                                <asp:Label ID="lblPosDateRequired" runat="server" ForeColor="Red" Text="*"></asp:Label>
                            </td>
                            <td style="border-bottom: dotted 1px #808080; vertical-align: bottom;">
                                SO Type:
                            </td>
                            <td colspan="2">
                                <asp:DropDownList ID="ddlPOType" runat="server" Enabled="False" Width="150px">
                                   <asp:ListItem Value="0">mO</asp:ListItem>
                                    <asp:ListItem Value="1">eO</asp:ListItem>
                                    <asp:ListItem Value="2">DO</asp:ListItem>
                                    <asp:ListItem Value="3">Special</asp:ListItem>
                                    <asp:ListItem Value="4">Special 1</asp:ListItem>
                                    <asp:ListItem Value="5">Special 2</asp:ListItem>
                                    <asp:ListItem Value="7">Sea</asp:ListItem>
                                    <asp:ListItem Value="8">Air</asp:ListItem>
                                    <asp:ListItem Value="9">VOR</asp:ListItem>
                                    <asp:ListItem Value="10">Initial Stock</asp:ListItem>
                                    <asp:ListItem Value="11">Manual</asp:ListItem>
                                    <asp:ListItem Value="12">Sale Quotation</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td valign="middle" style="border-bottom: dotted 1px #808080; vertical-align: bottom;">
                                Delivery Date:
                            </td>
                            <td style="" valign="top">
                                <asp:TextBox ID="txtDeliveryDate" Width="100px" runat="server"></asp:TextBox>
                                <asp:ImageButton ID="ImageButton1" runat="Server" AlternateText="Click to show calendar"
                                    ImageUrl="~/Images/Calendar_scheduleHS.png" />
                                <cc1:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtDeliveryDate"
                                    PopupButtonID="ImageButton1" Format="dd/MM/yyyy">
                                </cc1:CalendarExtender>
                                <asp:Label ID="lblDelDateRequired" runat="server" ForeColor="Red" Text="*"></asp:Label>
                            </td>
                            <td style="border-bottom: dotted 1px #808080; vertical-align: bottom;">
                                Order Processing:
                            </td>
                            <td colspan="2">
                                <asp:DropDownList ID="ddlOrderProcess" runat="server" Enabled="False" Width="150px">
                                    <asp:ListItem Value="0">New</asp:ListItem>
                                    <asp:ListItem Value="1">VSM Updated</asp:ListItem>
                                    <asp:ListItem Value="2">VSM Confirmed</asp:ListItem>
                                    <asp:ListItem Value="3">VSM Rejected</asp:ListItem>
                                    <asp:ListItem Value="4">Dealer Confirmed</asp:ListItem>
                                    <asp:ListItem Value="5">Dealer Rejected</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td style="border-bottom: dotted 1px #808080; vertical-align: bottom;">
                                Document Date:
                            </td>
                            <td>
                                <asp:TextBox ID="txtDocDate" Width="100px" runat="server"></asp:TextBox>
                                <cc1:CalendarExtender ID="txtDocDate_CalendarExtender" runat="server" Format="dd/MM/yyyy"
                                    PopupButtonID="imgDocDate" TargetControlID="txtDocDate">
                                </cc1:CalendarExtender>
                                <asp:ImageButton ID="imgDocDate" runat="Server" AlternateText="Click to show calendar"
                                    ImageUrl="~/Images/Calendar_scheduleHS.png" />
                                <asp:Label ID="lblDocDateRequired" runat="server" ForeColor="Red" Text="*"></asp:Label>
                            </td>
                            <td>
                                SO Number:
                            </td>
                            <td colspan="2">
                                <asp:Label ID="lblSONumber" runat="server"></asp:Label>
                                <asp:TextBox ID="txtSoNumber" runat="server" Width="90px"></asp:TextBox>
                                <cc1:CalendarExtender ID="txtSoNumber_CalendarExtender" runat="server" Format="dd/MM/yyyy"
                                    PopupButtonID="Image1" TargetControlID="txtSoNumber">
                                </cc1:CalendarExtender>
                            </td>
                        </tr>
                    </table>
                    <table id="Table1" width="100%" style="font-weight: bold">
                        <tr>
                            <td class="FormLineItemAlt" style="width: 150px;">
                                <asp:Label ID="lblCustomerInfo" runat="server" Text="Customer:"></asp:Label>
                            </td>
                            <td class="FormLineItemAlt" style="white-space: nowrap;" valign="middle">
                                <asp:TextBox ID="txtCustomerCode" runat="server" ReadOnly="True" Style="width: 13%;"
                                    BackColor="#E6E6E6"></asp:TextBox>
                                <asp:TextBox ID="txtCustomerName" runat="server" Style="width: 35%;" Enabled="False"></asp:TextBox>
                                <asp:Button ID="btnSelectBP" runat="server" OnClientClick="OpenBP(); return false;"
                                    Text="..." Style="background-image: url('/Images/bgButton.png'); background-repeat: no-repeat;
                                    font-weight: bold" Enabled="False" Visible="False" Width="30px" />
                                <asp:Label ID="lblCustomerRequired" runat="server" ForeColor="Red" Text="*"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItem" style="width: 100px;">
                                <asp:Label ID="lblConPersonName" Text="Contact Person:" runat="server"></asp:Label>
                            </td>
                            <td class="FormLineItem" valign="middle">
                                <asp:TextBox ID="txtContactPerson" runat="server" Width="485px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItemAlt" valign="middle" colspan="2">
                                <asp:Button ID="btnAddItems" runat="server" OnClick="btnAddItems_Click" OnClientClick="OpenItemPopup(); return false;"
                                    Style="background-image: url('/Images/bgButton.png'); background-repeat: no-repeat;"
                                    Text="Add new item" Width="110px" />
                                <asp:FileUpload ID="FileUploadControl" runat="server" />
                                <asp:Button ID="btnImport" runat="server" OnClick="btnImport_Click" Style="background-image: url('/Images/bgButton.png');
                                    background-repeat: no-repeat;" Text="Import" Width="60px" />
                            </td>
                        </tr>
                        <tr>
                            <td align="left" style="border-bottom: dotted 1px #808080; vertical-align: bottom;"
                                colspan="2">
                                ItemCode :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <asp:TextBox ID="txtItemCode" runat="server" OnTextChanged="txtItemCode_TextChanged"
                                    Width="170px" AutoPostBack="true"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                    <hr />
                    <div style="width: 100%">
                        <asp:GridView ID="grvSO" CssClass="GridInner" runat="server" Width="100%" BorderColor="White"
                            BackColor="White" AllowSorting="True" AutoGenerateColumns="False" CellPadding="2"
                            HeaderStyle-Height="27px" OnRowCreated="grvSO_RowCreated" CellSpacing="2" HeaderStyle-VerticalAlign="Middle"
                            AllowPaging="True" OnPageIndexChanging="grvSearchResult_PageIndexChanging" PageSize="20"
                            OnRowDataBound="grvSearchResult_RowDataBound">
                            <PagerSettings Mode="NumericFirstLast" />
                            <PagerStyle BackColor="#70A0D0" Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                            <RowStyle BackColor="#D9E0ED" BorderColor="White" BorderWidth="2px" Height="25px" />
                            <AlternatingRowStyle BackColor="#EEF1F7" BorderColor="White" BorderWidth="2px" />
                            <Columns>
                                <asp:CommandField HeaderText="Action" ShowDeleteButton="True" ShowEditButton="False"
                                    Visible="false" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"
                                    ItemStyle-Width="70px" />
                                <asp:TemplateField HeaderText="Action">
                                    <ItemStyle HorizontalAlign="Center" Width="20px" />
                                    <HeaderStyle VerticalAlign="Middle" />
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lnkDelete" runat="server" Text="Delete" TabIndex="-1" OnClick="lnkDelete_Click"></asp:LinkButton>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="#">
                                    <ItemStyle HorizontalAlign="Center" Width="20px" />
                                    <HeaderStyle VerticalAlign="Middle" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblNo" runat="server" Text='<%# Bind("No") %>' BorderStyle="none">
                                        </asp:Label>
                                          <asp:HiddenField ID="hdnLineNum" runat="server" Value='<%# Bind("LineNum") %>'></asp:HiddenField>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Item Code">
                                    <ItemStyle HorizontalAlign="Center" />
                                    <HeaderStyle VerticalAlign="Middle" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblItemCode" runat="server" Text='<%# Bind("ItemCode") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Old Item Code">
                                    <ItemStyle HorizontalAlign="Center" />
                                    <HeaderStyle VerticalAlign="Middle" />
                                    <ItemTemplate>
                                        <asp:TextBox ID="txtOldItemCode" AutoPostBack="true" runat="server" Text='<%# Bind("U_OldItemCode") %>'
                                            OnTextChanged="txtOldItemCode_OnTextChanged" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Item Name">
                                    <ItemStyle HorizontalAlign="left" />
                                    <HeaderStyle VerticalAlign="Middle" Font-Bold="true" />
                                    <HeaderTemplate>
                                        <asp:Label ID="lblHeaderItemName" runat="Server" Text="Item Name" />
                                        <asp:Label ID="lblItemNameRequired" runat="server" Font-Bold="true" Text="*" ForeColor="Red" />
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="txtItemName" runat="server" Text='<%# Bind("Dscription") %>' BorderStyle="none" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Qty.">
                                    <ItemStyle HorizontalAlign="Right" />
                                    <HeaderStyle VerticalAlign="Middle" Width="100px" />
                                    <HeaderTemplate>
                                        <asp:Label ID="lblHeaderQty" runat="Server" Text="Qty." />
                                        <asp:Label ID="lblQtyRequired" runat="server" Font-Bold="true" Text="*" ForeColor="Red" />
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:TextBox ID="txtOrderQuantity" runat="server" Width="97%" Text='<%# Bind("Quantity") %>'
                                            AutoPostBack="true" OnKeyPress="return isNumberKey(this, event);" Style="text-align: right"
                                            OnTextChanged="txtOrderQuantity_OnTextChanged" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Unit price">
                                    <ItemStyle HorizontalAlign="Right" />
                                    <HeaderStyle VerticalAlign="Middle" Width="100px" />
                                    <HeaderTemplate>
                                        <asp:Label ID="lblHeaderQty" runat="Server" Text="Unit price" />
                                        <asp:Label ID="lblQtyRequired" runat="server" Font-Bold="true" Text="*" ForeColor="Red" />
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:TextBox ID="txtUnitPrice" runat="server" Style="text-align: right; width: 98%;"
                                            Text='<%# Bind("PriceBefDi") %>' AutoPostBack="true" OnKeyPress="return isNumberKey(this, event);"
                                            OnTextChanged="txtUnitPrice_OnTextChanged" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Total Before Disc.">
                                    <ItemStyle HorizontalAlign="Right" />
                                    <HeaderStyle VerticalAlign="Middle" />
                                    <ItemTemplate>
                                        <asp:Label ID="txtLineTotal" runat="server" Text='<%# Bind("LineTotal") %>' BorderStyle="none" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Disc. Amt" Visible="false">
                                    <ItemStyle HorizontalAlign="Right" />
                                    <HeaderStyle VerticalAlign="Middle" Width="80px" />
                                    <ItemTemplate>
                                        <asp:TextBox ID="txtDiscount" runat="server" Width="97%" Style="text-align: right"
                                            AutoPostBack="true" Text='<%# Bind("U_Discount") %>' OnKeyPress="return isNumberKey(this, event);"
                                            OnTextChanged="txtDiscount_OnTextChanged" />
                                        <asp:TextBox ID="txtIncentiveDsc" runat="server" Width="97%" Style="text-align: right"
                                            OnKeyPress="return isNumberKey(this, event);" Text='<%# Bind("U_IncentiveDiscount") %>'
                                            AutoPostBack="true" OnTextChanged="txtIncentiveDsc_OnTextChanged" Visible="false" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Discount (%)">
                                    <ItemStyle HorizontalAlign="Right" />
                                    <HeaderStyle VerticalAlign="Middle" Width="60px" />
                                    <HeaderTemplate>
                                        <asp:Label ID="lblHeaderDiscount" runat="Server" Text="Discount (%)" />
                                        <asp:Label ID="lblDiscountRequired" runat="server" Font-Bold="true" Text="*" ForeColor="Red" />
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:TextBox ID="txtDiscountPrcnt" runat="server" Width="97%" Style="text-align: right"
                                            Height="21px" Text='<%# Bind("DiscPrcnt") %>' AutoPostBack="true" OnKeyPress="return isNumberKey(this, event);"
                                            OnTextChanged="txtDiscountPrcnt_OnTextChanged" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Total After Disc.">
                                    <ItemStyle HorizontalAlign="Right" />
                                    <HeaderStyle VerticalAlign="Middle" />
                                    <ItemTemplate>
                                        <asp:Label ID="txtTotalAfter" runat="server" Text='<%# Bind("TotalAfDisc") %>' BorderStyle="none" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Tax">
                                    <ItemStyle HorizontalAlign="Center" Width="60px" />
                                    <HeaderStyle VerticalAlign="Middle" Font-Bold="true" />
                                    <ItemTemplate>
                                        <asp:DropDownList ID="ddlVatGroup" AutoPostBack="true" OnSelectedIndexChanged="ddlVatGroup_SelectedIndexChanged"
                                            Style="width: 98%;" runat="server" />
                                        <asp:HiddenField ID="hdnVatGroup" Value='<%# Bind("VatGroup") %>' runat="server" />
                                        <asp:HiddenField ID="hdnVatPrcnt" Value='<%# Bind("VatPrcnt") %>' runat="server" />
                                        <asp:HiddenField ID="hdnVatSum" Value='<%# Bind("VatSum") %>' runat="server" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Warehouse">
                                    <ItemStyle HorizontalAlign="Center" Width="130px" />
                                    <HeaderStyle VerticalAlign="Middle" Font-Bold="true" />
                                    <ItemTemplate>
                                        <asp:DropDownList ID="ddlWhs" AutoPostBack="true" OnSelectedIndexChanged="ddlWhs_SelectedIndexChanged"
                                            Style="width: 98%;" runat="server" />
                                        <asp:HiddenField ID="hdnWhsCode" Value='<%# Bind("WhsCode") %>' runat="server" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Ship Date">
                                    <HeaderStyle VerticalAlign="Middle" Width="100px" />
                                    <ItemStyle HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <asp:TextBox ID="txtShipDate" Style="width: 75%;" runat="server" Text='<%# Bind("ShipDate", "{0:dd/MM/yyyy}")%>'
                                         OnTextChanged="txtShipDate_OnTextChanged" AutoPostBack="true" />
                                        <asp:ImageButton ID="imgShipDate" runat="Server" AlternateText="Click to show calendar"
                                            ImageUrl="~/Images/Calendar_scheduleHS.png" />
                                        <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtShipDate"
                                            PopupButtonID="imgShipDate" Format="dd/MM/yyyy">
                                        </cc1:CalendarExtender>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Line Total">
                                    <ItemStyle HorizontalAlign="Right" />
                                    <HeaderStyle VerticalAlign="Middle" />
                                    <ItemTemplate>
                                        <asp:Label ID="txtTotal" runat="server" Text='<%# Bind("Total") %>' BorderStyle="none" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="VSM InStock" Visible="false">
                                    <ItemStyle HorizontalAlign="Right" />
                                    <HeaderStyle VerticalAlign="Middle" Width="50px" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblInStockVSM" runat="server" Text='<%# Bind("OnHand_VSM") %>' BorderStyle="none" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Dealer InStock" Visible="false">
                                    <ItemStyle HorizontalAlign="Right" />
                                    <HeaderStyle VerticalAlign="Middle" Width="50px" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblInStockDealer" runat="server" Text='<%# Bind("OnHand") %>' BorderStyle="none" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Base Entry" Visible="false">
                                    <HeaderStyle VerticalAlign="Middle" />
                                    <ItemStyle HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblBaseEntry" runat="server" Text='<%# Bind("BaseEntry") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Base Type" Visible="false">
                                    <HeaderStyle VerticalAlign="Middle" />
                                    <ItemStyle HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblBaseType" runat="server" Text='<%# Bind("BaseType") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Base Line" Visible="false">
                                    <HeaderStyle VerticalAlign="Middle" />
                                    <ItemStyle HorizontalAlign="Center" />
                                    <ItemTemplate>
                                        <asp:Label ID="lblBaseLine" runat="server" Text='<%# Bind("BaseLine") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <HeaderStyle BackColor="#6095C9" ForeColor="#ffffff" Font-Overline="False" Height="27px"
                                VerticalAlign="Bottom" />
                            <EmptyDataTemplate>
                                <table class="GridInner" style="width: 100%; border-color: White;" border="1" rules="all"
                                    cellspacing="2" cellpadding="2">
                                    <tr valign="middle" style="height: 27px; color: white; text-decoration: none; background-color: rgb(96, 149, 201);
                                        text-align: center;">
                                        <th>
                                            <span>Action</span>
                                        </th>
                                        <th>
                                            <span>#</span>
                                        </th>
                                        <th>
                                            <span>Item Code</span>
                                        </th>
                                        <th>
                                            <span>Item Name</span>
                                        </th>
                                        <th>
                                            <span>Qty.</span>
                                        </th>
                                        <th>
                                            <span>Unit price</span>
                                        </th>
                                        <th>
                                            <span>Total Before Disc.</span>
                                        </th>
                                        <th>
                                            <span>Disc. Amt</span>
                                        </th>
                                        <th>
                                            <span>Tax</span>
                                        </th>
                                        <th>
                                            <span>Warehouse</span>
                                        </th>
                                        <th>
                                            <span>Ship Date</span>
                                        </th>
                                        <th>
                                            <span>Line Total</span>
                                        </th>
                                        <th>
                                            <span>VSM InStock</span>
                                        </th>
                                        <th>
                                            <span>Dealer InStock</span>
                                        </th>
                                    </tr>
                                    <tr>
                                        <td colspan="14">
                                            <span>No Data</span>
                                        </td>
                                    </tr>
                                </table>
                            </EmptyDataTemplate>
                        </asp:GridView>
                    </div>
                    <hr width="100%" />
                </div>
                <table width="100%" border="0">
                    <tr>
                        <td valign="middle" style="width: 70%;">
                            <table style="width: 100%;">
                                <tr>
                                    <td valign="middle" style="width: 10%;">
                                        <strong>Remarks:</strong>
                                    </td>
                                    <td style="width: 50%;">
                                        <asp:TextBox runat="server" ID="txtRemarks" Height="71px" TextMode="MultiLine" Style="width: 98%;"></asp:TextBox>
                                    </td>
                                    <td valign="middle" style="width: 10%;">
                                        <strong>Sale Man:</strong>
                                    </td>
                                    <td valign="middle" style="width: 30%;">
                                        <asp:DropDownList ID="ddlSaleMan" Style="width: 100%;" runat="server">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td style="width: 30%">
                            <div style="margin-right: 5px;">
                                <table border="0" width="100%">
                                    <tr valign="middle" style="height: 27px; color: black; font-weight: bold; text-decoration: none;
                                        background-color: #D9E0ED;">
                                        <td style="width: 50%" align="right">
                                            <asp:Label ID="lblSubTotalName" runat="server" Text="Sub Total:"></asp:Label>
                                        </td>
                                        <td style="width: 50%" align="right">
                                            <asp:Label ID="lblSubTotal" runat="server" Font-Bold="True" ForeColor="Red"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr valign="middle" style="height: 27px; color: white; font-weight: bold; text-decoration: none;
                                        background-color: rgb(96, 149, 201);">
                                        <td style="width: 50%" align="right">
                                            <asp:Label ID="lblTaxAmountName" runat="server" Text="Tax Amount:"></asp:Label>
                                        </td>
                                        <td style="width: 50%" align="right">
                                            <asp:Label ID="lblTaxAmount" runat="server" Font-Bold="True" ForeColor="Red"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr valign="middle" style="height: 27px; font-weight: bold; text-decoration: none;
                                        background-color: #D9E0ED;">
                                        <td style="width: 50%" align="right">
                                            <asp:Label ID="lblGrandTotalName" runat="server" Text="Grand Total:"></asp:Label>
                                        </td>
                                        <td style="width: 50%" align="right">
                                            <asp:Label ID="lblPaymentTotal" runat="server" Font-Bold="True" ForeColor="Red"></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <div style="margin-left: 5px; width: 99%;">
                                <hr />
                            </div>
                            <table style="width: 100%">
                                <tr>
                                    <td style="width: 400px;">
                                        <asp:Button ID="btnSave" runat="server" Text="Save" Style="background-image: url('/Images/bgButton.png');
                                            background-repeat: no-repeat; color: White;" OnClick="btnSave_Click" BorderStyle="Solid"
                                            Width="60px" Enabled="False" Visible="False" />
                                        <asp:Button ID="btnCancel" runat="server" Text="Cancel" Style="background-image: url('/Images/bgButton.png');
                                            background-repeat: no-repeat; color: White;" BorderStyle="Solid" OnClick="btnCancel_Click"
                                            Width="60px" Enabled="False" Visible="False" OnClientClick='return confirm("Do you want to continue?");' />
                                        <asp:Button ID="btnUpdated" runat="server" BorderStyle="Solid" Style="background-image: url('/Images/bgButton.png');
                                            background-repeat: no-repeat; color: White;" Text="Update" Width="50px" Enabled="False"
                                            OnClick="btnUpdated_Click" OnClientClick='return confirm("Do you want to continue?");' />
                                        <asp:Button ID="btnConfirmed" runat="server" BorderStyle="Solid" Enabled="False"
                                            Style="background-image: url('/Images/bgButton.png'); background-repeat: no-repeat;
                                            color: White;" Text="Confirm" Width="50px" OnClick="btnConfirmed_Click" OnClientClick='return confirm("Do you want to continue?");' />
                                        <asp:Button ID="btnRejected" runat="server" BorderStyle="Solid" Enabled="False" Style="background-image: url('/Images/bgButton.png');
                                            background-repeat: no-repeat; color: White;" Text="Reject" Width="50px" OnClick="btnRejected_Click"
                                            OnClientClick='return confirm("Do you want to continue?");' />
                                        <asp:Button ID="btnPrint" runat="server" BorderStyle="Solid" Enabled="False" Style="background-image: url('/Images/bgButton.png');
                                            background-repeat: no-repeat; color: White;" Text="Print" Width="60px" />
                                        <asp:Button ID="btnLastRecord" runat="server" BorderStyle="Solid" Enabled="False"
                                            OnClick="btnLastRecord_Click" Style="background-image: url('/Images/bgButton.png');
                                            background-repeat: no-repeat; color: White;" Text="&gt;&gt;" Width="40px" Visible="False" />
                                    </td>
                                    <td>
                                        <asp:Label ID="lblError" runat="server" Visible="False" Font-Bold="True" ForeColor="Red"></asp:Label>
                                    </td>
                                    <td align="right" style="width: 305px; display: none;">
                                        <asp:Button ID="btnCopyFrom" runat="server" Text="Copy from Sales Quotation" Style="background-image: url('/Images/bgButton.png');
                                            background-repeat: no-repeat; color: White;" OnClientClick="OpenDocList('23', 'Sales Quotation List'); return false;"
                                            BorderStyle="Solid" Width="160px" Enabled="False" />
                                        <asp:Button ID="btnCopyTo" runat="server" Text="Copy to RS Invoice" Style="background-image: url('/Images/bgButton.png');
                                            background-repeat: no-repeat; color: White;" OnClick="btnCopyTo_Click" BorderStyle="Solid"
                                            Width="135px" Enabled="False" />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
            <Triggers>
                <asp:PostBackTrigger ControlID="btnImport" />
                <asp:PostBackTrigger ControlID="btnGetImportTemplate" />
            </Triggers>
        </asp:UpdatePanel>
    </div>
</asp:Content>
